package com.spring.annotation_import_demo;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ConfigB.class);

		String[] beanDefinitionNames = ctx.getBeanDefinitionNames();
		for (String beanDefinitionName : beanDefinitionNames) {
			System.out.println(beanDefinitionName);
		}

		BeanTest beanAAA = (BeanTest) ctx.getBean("beanA");
		String s = beanAAA.toString();
		System.out.println(s);
	}
}
